function [sim_rms, sim_dE] = ...
    ref_summary( ...
    ref1, ref1name, ...
    ref2, ref2name, ...
    cmf1, cmf2,...
    ill1, ill2, wp,...
    do_plot )

    if size(ref1)~=size(ref2)
        error('Size has to be the same when comparing two reflectances');
    end
    
    if nargin < 10
        do_plot = 0;
    end

    len = size(ref1,1);
    sim_rms = zeros(len,1);
    sim_dE = zeros(len,1);
    for i=1:len
        [sim_rms(i), sim_dE(i)] = color_tool.ref_diff( ...
            ref1(i,:),...
            ref2(i,:),... 
            cmf1,...
            cmf2,...
            ill1,...
            ill2,...
            wp);
    end

    if do_plot
        figure, plot(ref1'), axis([0 size(ref1,2) 0 1]), title(sprintf('Spectrum: %s',ref1name));
        figure, plot(ref2'), axis([0 size(ref1,2) 0 1]), title(sprintf('Spectrum: %s',ref2name));
        figure, hist(sim_rms), title(sprintf('RMS: %s v.s. %s', ref1name, ref2name));
        figure, hist(sim_dE), title(sprintf('dE00: %s v.s. %s', ref1name, ref2name));
%        figure, plot((ref2-ref1)'), axis([0 size(ref1,2) 0 1]), title(sprintf('Difference: %s - %s', ref1name, ref2name));
    end

    rec.dump_mxn( sprintf('%s v.s. %s RMS', ref1name, ref2name ), mean(sim_rms), max(sim_rms), min(sim_rms) );
    rec.dump_mxn( sprintf('%s v.s. %s dE00',ref1name, ref2name), mean(sim_dE), max(sim_dE), min(sim_dE) );
end